package com.android.hidephotosplus.model;

import android.os.Parcel;
import android.os.Parcelable;

public class ModelMedia extends ModelAlbum {

	public String nameMedia;

	public int typeMedia;

	public String date;

	public String pathMediaStock;

	public String pathMediaHidden;

	public long idMedia;
	
	public boolean isVideo = false;
	
	public boolean isVideo() {
		return isVideo;
	}

	public void setVideo(boolean isVideo) {
		this.isVideo = isVideo;
	}

	public String getPathMediaStock() {
		return pathMediaStock;
	}

	public void setPathMediaStock(String pathMediaStock) {
		this.pathMediaStock = pathMediaStock;
	}

	public String getPathMediaHidden() {
		return pathMediaHidden;
	}

	public void setPathMediaHidden(String pathMediaHidden) {
		this.pathMediaHidden = pathMediaHidden;
	}

	public void setIdMedia(long idMedia) {
		this.idMedia = idMedia;
	}

	public ModelMedia() {
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public long getIdMedia() {
		return idMedia;
	}

	public String getNameMedia() {
		return nameMedia;
	}

	public void setNameMedia(String nameMedia) {
		this.nameMedia = nameMedia;
	}

	public int getTypeMedia() {
		return typeMedia;
	}

	public void setTypeMedia(int typeMedia) {
		this.typeMedia = typeMedia;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeLong(idAlbum);
		dest.writeLong(idMedia);
		dest.writeInt(numberMedia);
		dest.writeString(nameAlbum);
		dest.writeString(pathAlbum);
		dest.writeString(pathMediaStock);
		dest.writeString(pathMediaHidden);
		dest.writeString(nameMedia);
		dest.writeInt(typeMedia);
		dest.writeString(date);
		dest.writeByte((byte) (isVideo ? 1 : 0));
	}

	public ModelMedia(Parcel parcel) {
		idAlbum = parcel.readLong();
		idMedia = parcel.readLong();
		numberMedia = parcel.readInt();
		nameAlbum = parcel.readString();
		pathAlbum = parcel.readString();
		pathMediaStock = parcel.readString();
		pathMediaHidden = parcel.readString();
		nameMedia = parcel.readString();
		typeMedia = parcel.readInt();
		date = parcel.readString();
		isVideo = parcel.readByte() == 1;
	}

	public static final Parcelable.Creator<ModelMedia> CREATOR = new Parcelable.Creator<ModelMedia>() {
		@Override
		public ModelMedia createFromParcel(Parcel source) {
			return new ModelMedia(source);
		}

		@Override
		public ModelMedia[] newArray(int size) {
			return new ModelMedia[size];
		}
	};

}
